m=imread('D:\matlab\dogandcat.jpg');
r=m(:,:,1);
r(:,:,2)=0;
r(:,:,3)=0;
g=r;
g(:,:,1)=0;
g(:,:,2)=m(:,:,2);
l=r;
l(:,:,1)=0;
l(:,:,3)=m(:,:,3);
imshow(m);
imshow(r);
imshow(g);
imshow(l);
r_g=m(:,:,1);
g_g=m(:,:,2);
l_g=m(:,:,3);
imshow(r_g);
imshow(g_g);
imshow(l_g);
